// ActionScript file

import mx.controls.Alert;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent; 

private function init():void
{
	
 amf.getCountries.send();	 

}

 private function getCountriesResult(e:ResultEvent):void
   {
   				cbPais.dataProvider = e.result as Array;
   }
   
    private function getCountriesFault(e:FaultEvent):void
   {
   			Alert.show("",String(e.fault));
   }
   
  private function cbPaisChange():void
  {
    
   amf.getEstates.send(cbPais.selectedItem.data );
  
  }
  
  
   private function getEstatesResult(e:ResultEvent):void
   {
   				cbEstado.dataProvider = e.result as Array;
   }
   
    private function getEstatesFault(e:FaultEvent):void
   {
          	    Alert.show("",String(e.fault));
   }
    